package com.byb.server.service.mapper;

import com.byb.server.domain.*;
import com.byb.server.service.dto.WordKeyDTO;

import org.mapstruct.*;

/**
 * Mapper for the entity WordKey and its DTO WordKeyDTO.
 */
@Mapper(componentModel = "spring", uses = {})
public interface WordKeyMapper extends EntityMapper <WordKeyDTO, WordKey> {
    
    @Mapping(target = "products", ignore = true)
    WordKey toEntity(WordKeyDTO wordKeyDTO); 
    default WordKey fromId(Long id) {
        if (id == null) {
            return null;
        }
        WordKey wordKey = new WordKey();
        wordKey.setId(id);
        return wordKey;
    }
}
